<?php

class org_unit_ext extends bee\DAO
{ public $id;
  public $VAT;

  function __construct($pk = 0)
  { parent::__construct($pk);
  }

  function INSERT($params = DAO_POST_SELECT)
  { $sqt = "INSERT INTO `$this->__table` (`id`, `VAT`) VALUES (:id, :VAT)";
    //echo "++++ $sqt +++++" . print_r($this, true);
    $stmt = $this->__conn->prepare($sqt);
    $stmt->bindParam(":id", $this->id, PDO::PARAM_INT);
    $stmt->bindParam(":VAT", $this->VAT, PDO::PARAM_STR);
    if($stmt->execute())
    { if($params & DAO_POST_SELECT)
      { $this->SELECT($this->id);
      }
      return 1;
    }
    return 0;
  }


}